<extend name="Layout/ins_page" />

<block name="head">
</block>
<block name="js"></block>

<block name="content">
    <!--content begin-->

    <!--<link href="/Public/CSS/Report/StickStockReport/jcDate.css" rel="stylesheet" type="text/css"/>-->
    <style type="text/css">
        #dd{
            margin-left:70px;

        }
    </style>

    <link href="/sap/demo.css" rel="stylesheet" type="text/css" />
    <script src="/sap/scripts/boot.js" type="text/javascript"></script>

    <body>

    <div id="main" style="width:950px;height:500px;">
    </div>

    <script src="/Public/Scripts/Report/StickStockReport/echarts.js" charset="utf-8"></script>
    <script type="text/javascript">

        require.config({
            paths: {
                echarts:'./Public/Scripts/Report/StickStockReport/build/dist'
            }
        });

        require(['echarts', 'echarts/chart/bar'
            ],
            function(ec) {

                var myChart = ec.init(document.getElementById('main'));

                var option = {
                    title: {
                        text: '滞销库存报表 数值单位=10K(万) - <?php echo $userInfo['emp_no'];?>',
                    },
                    tooltip: {
                        trigger: 'axis',
                        axisPointer: {
                            type: 'shadow'
                        },
                        formatter: function(params) {
                            return params[0].name + '<br/>'
                                + params[0].seriesName + ' : ' + params[0].value + '<br/>'
                                + params[1].seriesName + ' : ' + params[1].value + '<br/>'
                        }
                    },
                    legend: {
                        selectedMode: true,
                        data: ['安全金额','滞销金额']
                    },
                    toolbox: {
                        show:  true,
                        feature: {
                            mark: {
                                show:false
                            },
                            dataView: {
                                show: false,
                                readOnly: false
                            },
                            restore: {
                                show: true
                            },
                            saveAsImage: {
                                show: true
                            }
                        }
                    },
                    calculable: true,
                    xAxis: [{
                        type: 'category',
                        data: [<?php echo $checkdate; ?>]
                        }],
                yAxis: [{
                    type: 'value',
                }],
                    series: [{
                    name: '滞销金额',
                    type: 'bar',
                    stack: 'sum',
                    barCategoryGap: '30%',
                    itemStyle: {
                        normal: {
                            color: '#f7faff',
                            barBorderColor: '#000000',
                            barBorderWidth: 1,
                            barBorderRadius: 0,
                            label: {
                                show: true,
                                position: 'insideTop',

                                textStyle: {
                                    color: '#000000'
                                }


                            }
                        }
                    },
                    data: [<?php echo $StickStock;?>]
            },

                {
                    name: '安全金额',
                    type: 'bar',
                    stack: 'sum',
                    itemStyle: {
                    normal: {
                        color: '#1d3adf',
                            barBorderColor: '#000000',
                            barBorderWidth: 1,
                            barBorderRadius: 0,
                            label: {
                            show: true,
                                position: 'top',

                                textStyle: {
                                color: '#000000'
                            }
                        }
                    }
                },
                    data: [<?php echo $NoneStickStock;?>]
                }]
            };


                myChart.setOption(option);
            });
    </script>
    <div id="dd">
        <table id="cc">
        <tr>
        <td>报表日期：
    </td>
    <td id="bb">
        <div id="lanrenzhijia" ">
    <!--<input class="jcDate" size="18px" value="<?php echo date("m/d/Y", strtotime("1 days ago"));?>"/>-->
    </div>
    </td>
    <script src="/Public/Scripts/Report/StickStockReport/1.js"></script>
    <script src="/Public/Scripts/Report/StickStockReport/jQuery-jcDate.js"></script>
    <script>
        $(function (){
            $(".jcDate").jcDate({
                IcoClass : "jcDateIco",
                Event : "click",
                Speed : 100,
                Left : 0,
                Top : 28,
                format : "-",
                Timeout : 100
            });
        });
    </script>
    </td>
    <td class="aa">

        <input name="FromDate" id="FromDate" class="mini-datepicker" format="yyyy-MM-dd " showTime="true" valueType='string'
               value="<?php echo date("m/d/Y", strtotime("1 days ago"));?>"/>

        &nbsp&nbsp&nbsp&nbsp<button onClick="javascript:window.location.href='<?php  echo str_replace("Viewoption=month","Viewoption=day","".$controllerURL."&StartDate=".$StartDate."&Viewoption=day");?>'">前12天</button>
        <button onClick="javascript:window.location.href='<?php  echo str_replace("Viewoption=day","Viewoption=week","".$controllerURL."&StartDate=".$StartDate."&Viewoption=week");?>'">前12周</button>
        <button onClick="javascript:window.location.href='<?php  echo str_replace("Viewoption=day","Viewoption=month","".$controllerURL."&StartDate=".$StartDate."&Viewoption=month");?>'">前12月</button>
    </td>
    <td class="aa">
        &nbsp&nbsp&nbsp&nbsp3C滞销标准: <input type="text"  value="7"  id="zx" " name=" zx" size="1" maxlength="3" onKeyUp="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}"  readonly="readonly"/>天
        &nbsp&nbsp&nbsp&nbsp非3C滞销标准: <input type="text" value="30" id="fzx" " name="fzx" size="1" maxlength="3" onKeyUp="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}"  readonly="readonly"/>天
    </td>
    </tr>
    </table>
    </div>
    </DIV>
    </body>

    <!--content end-->
</block>